-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support all WaveBank versions #320
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of tiny changes, otherwise lgtm
src/FACT_internal.c
Outdated
@@ -3105,7 +3107,15 @@ uint32_t FACT_INTERNAL_ParseWaveBank( | |||
#define DOSWAP_64(x) x = FAudio_swap64BE(x) | |||
|
|||
fileOffset = offset; | |||
READ(&header, sizeof(header)) | |||
|
|||
memset(&header, 0, sizeof(header)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
memset(&header, 0, sizeof(header)); | |
FAudio_zero(&header, sizeof(header)); |
src/FACT_internal.c
Outdated
if (header.dwVersion > FACT_CONTENT_VERSION_2_4) | ||
READ(&header.dwHeaderVersion, sizeof(header.dwHeaderVersion)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (header.dwVersion > FACT_CONTENT_VERSION_2_4) | |
READ(&header.dwHeaderVersion, sizeof(header.dwHeaderVersion)); | |
if (header.dwVersion > FACT_CONTENT_VERSION_2_4) | |
{ | |
READ(&header.dwHeaderVersion, sizeof(header.dwHeaderVersion)); | |
} |
src/FACT_internal.c
Outdated
} | ||
*/ | ||
if ( header.dwVersion < FACT_CONTENT_VERSION_2_4 || | ||
header.dwVersion > FACT_CONTENT_VERSION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
header.dwVersion > FACT_CONTENT_VERSION) | |
header.dwVersion > FACT_CONTENT_VERSION ) |
src/FACT_internal.c
Outdated
{ | ||
return -2; | ||
} | ||
|
||
if (!FACT_INTERNAL_SupportedWBContent(header.dwHeaderVersion)) | ||
if ( header.dwVersion > FACT_CONTENT_VERSION_2_4 && | ||
!FACT_INTERNAL_SupportedWBContent(header.dwHeaderVersion)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!FACT_INTERNAL_SupportedWBContent(header.dwHeaderVersion)) | |
!FACT_INTERNAL_SupportedWBContent(header.dwHeaderVersion) ) |
In xactengine 2.5, the extra field HeaderVersion was added.
97f0f00
to
1e31d2e
Compare
In xactengine 2.5, the extra field HeaderVersion was added.